@filigran/chatbot 3.9.1 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -71,7 +71,9 @@ import { ChatPanel } from '@filigran/chatbot';
71
71
  | `apiBaseUrl` | `string` | **required** | Base URL for chat API endpoints |
72
72
  | `user` | `{ firstName: string }` | **required** | Current user info |
73
73
  | `topOffset` | `number` | `0` | Top offset in pixels (for sidebar/fullscreen with fixed headers) |
74
- | `agentDashboardUrl` | `string` | — | URL for "Browse agents" / "Create agent" links |
74
+ | `agentDashboardUrl` | `string` | — | XTM One URL for the "Browse agents" / "Create agent" links and the waiting panel's "Play Space Invaders in XTM One" link (`{url}/chat?arcade=play`, http(s) only) |
75
+ | `miniGameEnabled` | `boolean` | `true` | Show the waiting panel during longer waits: rotating messages and the invitation to play XTM One's arcade (the package ships no game of its own) |
76
+ | `onPlayWaitingGame` | `() => void` | — | Open the arcade in place instead of linking to XTM One, for a host that runs it itself (the XTM One floating assistant) |
75
77
  | `t` | `(key: string) => string` | identity | Translation function for i18n |
76
78
  | `accentColor` | `string` | `'#7b5cff'` | Primary accent color (hex) |
77
79
  | `logoIcon` | `React.ReactNode` | default icon | Custom logo/icon for the assistant |
@@ -708,19 +710,19 @@ Every key the package can ask for, grouped by where it appears:
708
710
  - `'the agent'`
709
711
  - `'{tool} (+{count} more)…'`
710
712
 
711
- **Waiting mini-game**
713
+ **Waiting panel**
712
714
 
713
715
  - `'Almost there'`
714
716
  - `'Analyzing the details'`
715
717
  - `'Connecting the dots'`
716
718
  - `'Consulting the sources'`
717
719
  - `'Crunching the data'`
720
+ - `'Play Space Invaders'`
721
+ - `'Play Space Invaders in XTM One'`
718
722
  - `'Polishing the answer'`
719
723
  - `'Putting it together'`
720
724
  - `'Reticulating splines'`
721
725
  - `'Thinking it through'`
722
- - `'Turn off the waiting mini-game'`
723
- - `'Turn on the waiting mini-game'`
724
726
  - `'Wrapping things up'`
725
727
 
726
728
  **Reasoning details**
package/dist/index.d.ts CHANGED
@@ -245,6 +245,11 @@ interface ChatPanelProps {
245
245
  apiBaseUrl: string;
246
246
  /** Custom API endpoint configuration. */
247
247
  apiEndpoints?: ApiEndpoints;
248
+ /**
249
+ * The XTM One URL: the header's "Browse agents" / "Create agent" links, and
250
+ * the waiting panel's invitation to play the arcade there
251
+ * (`{agentDashboardUrl}/chat?arcade=play`). Only an http(s) URL is linked.
252
+ */
248
253
  agentDashboardUrl?: string;
249
254
  user: {
250
255
  firstName: string;
@@ -314,12 +319,17 @@ interface ChatPanelProps {
314
319
  */
315
320
  backendType?: BackendType;
316
321
  /**
317
- * Show the waiting experience during longer waits: dynamic rotating status
318
- * messages plus an optional Space Invader mini-game that shoots the message
319
- * letters away one by one. Users can still toggle the game off per browser
320
- * from the panel; this prop is a host-level master switch. Default: true.
322
+ * Show the waiting panel during longer waits: rotating status messages and
323
+ * an invitation to play XTM One's Space Invaders arcade, in a new tab
324
+ * through `agentDashboardUrl` or in place through `onPlayWaitingGame`. The
325
+ * package ships no game of its own. Host-level master switch. Default: true.
321
326
  */
322
327
  miniGameEnabled?: boolean;
328
+ /**
329
+ * Opens the arcade in place instead of linking to XTM One, for a host that
330
+ * runs it itself (the XTM One floating assistant). Wins over the link.
331
+ */
332
+ onPlayWaitingGame?: () => void;
323
333
  /**
324
334
  * Notify the user when a long-running turn finishes while they are not
325
335
  * watching the chat — away (tab hidden / another window) via a document-title